#!/usr/bin/php
<?php


$domain = "pulver.com";

$voipprotocol =  array("sip","iax");
$transportproto = array("udp","tcp");

foreach($voipprotocol as $voipprot)
{
   foreach($transportproto as $trprot)
   {
	$voipdomain = "_" . $voipprot . "._" . $trprot  . "." .  $domain;
	echo "Searching $voipdomain\n";
	$rootinfo = dns_get_record($voipdomain,DNS_ALL, $nsinfo, $addinfo);
	//print_r($rootinfo);
	foreach($rootinfo as $srootinfo)
		echo  strtoupper($voipprot) . " " . strtoupper($trprot) . " HOST: " .
		 $srootinfo['target'] . ":" . $srootinfo['port'] . "\n";	
   }
}

?>
